<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>导出Excel</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    #include("common/header.html")
</head>

<body>
<div style="margin: 15px;">
    <div class="layui-form" id="validate">
        <div class="layui-form-item">
            <label class="layui-form-label">范围选择</label>
            <div class="layui-input-inline">
                <input class="layui-input" placeholder="开始日" is-yz="true" yz-type="null" id="starttime">
            </div>
            <div class="layui-input-inline">
                <input class="layui-input" placeholder="截止日" is-yz="true" yz-type="null" id="endtime">
            </div>
        </div>
    </div>
</div>
</body>

<script>
    layui.use('laydate', function () {
        var laydate = layui.laydate;

        var start = {
            min: '1900-01-01 00:00:00',
            max: '2099-06-16 23:59:59',
            istoday: false,
            zIndex: 9999999999,
            choose: function (datas) {
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };

        var end = {
            min: '1900-01-01 00:00:00',
            max: '2099-06-16 23:59:59',
            istoday: false,
            zIndex: 9999999999,
            choose: function (datas) {
                start.max = datas; //结束日选好后，重置开始日的最大日期
            }
        };

        document.getElementById('starttime').onclick = function () {
            start.elem = this;
            laydate(start);
        }
        document.getElementById('endtime').onclick = function () {
            end.elem = this
            laydate(end);
        }

    });
</script>

</html>